page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.viewport {
  background-color: #f4f4f4;
}

.panel {
  margin-top: 20rpx;
  background-color: #fff;

  .title {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30rpx 60rpx 30rpx 6rpx;
    height: 90rpx;
    line-height: 1;

    text {
      padding-left: 10rpx;
      font-size: 28rpx;
      font-weight: 600;
      color: #333;
      border-left: 4rpx solid #27ba9b;
    }

    navigator {
      font-size: 24rpx;
      color: #666;
    }
  }
}

.arrow {
  &::after {
    content: '\e6c2';
    position: absolute;
    top: 50%;
    right: 30rpx;
    font-size: 32rpx;
    font-family: 'erabbit' !important;
    color: #ccc;
    transform: translateY(-50%);
  }
}

/* 商品信息 */
.goods {
  background-color: #fff;

  .preview {
    position: relative;
    height: 750rpx;

    .image {
      width: 750rpx;
      height: 750rpx;
    }

    .indicator {
      position: absolute;
      bottom: 30rpx;
      right: 30rpx;
      padding: 0 24rpx;
      height: 40rpx;
      font-family: Arial, Helvetica, sans-serif;
      color: #fff;
      line-height: 40rpx;
      border-radius: 30rpx;
      background-color: rgba(0, 0, 0, 0.3);

      .current {
        font-size: 26rpx;
      }

      .split {
        margin: 0 1rpx 0 2rpx;
        font-size: 24rpx;
      }
      .total {
        font-size: 24rpx;
      }
    }
  }

  .meta {
    position: relative;
    border-bottom: 1rpx solid #eaeaea;

    .price {
      box-sizing: border-box;
      padding: 25rpx 30rpx 0;
      height: 130rpx;
      font-size: 34rpx;
      color: #fff;
      background-color: #35c8a9;
    }

    .number {
      font-size: 56rpx;
    }

    .brand {
      position: absolute;
      top: 26rpx;
      right: 30rpx;
      width: 160rpx;
      height: 80rpx;
      overflow: hidden;
    }

    .name {
      margin: 20rpx;
      max-height: 88rpx;
      font-size: 32rpx;
      color: #333;
      line-height: 1.4;
    }

    .desc {
      padding: 0 20rpx 30rpx;
      font-size: 24rpx;
      color: #cf4444;
      line-height: 1;
    }
  }

  .action {
    padding-left: 20rpx;

    .item {
      position: relative;
      display: flex;
      align-items: center;
      padding-right: 60rpx;
      height: 90rpx;
      font-size: 26rpx;
      color: #333;
      border-bottom: 1rpx solid #eaeaea;

      &:last-child {
        border-bottom: 0 none;
      }
    }

    .label {
      margin: 0 16rpx 0 10rpx;
      width: 60rpx;
      color: #898b94;
    }

    .text {
      flex: 1;
      -webkit-line-clamp: 1;
    }
  }
}

/* 商品详情 */
.detail {
  padding-left: 20rpx;

  .content {
    margin-left: -20rpx;

    .image {
      width: 100%;
    }
  }

  .properties {
    margin-bottom: 30rpx;
    padding: 0 20rpx;

    .item {
      display: flex;
      padding: 10rpx;
      font-size: 26rpx;
      color: #333;
      line-height: 2;
      border-bottom: 1rpx dashed #ccc;
    }

    .label {
      width: 200rpx;
    }

    .value {
      flex: 1;
    }
  }
}

/* 同类推荐 */
.similar {
  .content {
    display: flex;
    flex-wrap: wrap;
    padding: 0 20rpx 200rpx;
    background-color: #f4f4f4;

    .goods {
      margin: 20rpx 7rpx;
      padding: 24rpx 20rpx 20rpx;
      width: 340rpx;
      border-radius: 10rpx;
      background-color: #fff;
    }

    .image {
      width: 300rpx;
      height: 260rpx;
    }

    .name {
      margin: 10rpx 0;
      height: 80rpx;
      font-size: 26rpx;
      color: #262626;
    }

    .price {
      font-size: 20rpx;
      color: #cf4444;
      line-height: 1;
    }

    .number {
      margin-left: 2rpx;
      font-size: 26rpx;
    }
  }

  navigator {
    &:nth-child(even) {
      margin-right: 0;
    }
  }
}

/* 底部工具栏 */
.toolbar {
  box-sizing: content-box;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20rpx var(--window-bottom);
  height: 100rpx;
  border-top: 1rpx solid #ededed;
  background-color: #fff;

  .buttons {
    display: flex;

    & > view {
      width: 220rpx;
      font-size: 26rpx;
      color: #fff;
      text-align: center;
      line-height: 72rpx;
      border-radius: 72rpx;
    }

    .addcart {
      background-color: #ffa868;
    }

    .buynow,
    .payment {
      margin-left: 20rpx;
      background-color: #27ba9b;
    }
  }

  .icons {
    flex: 1;
    display: flex;
    align-items: center;
    padding-right: 10rpx;

    /* #ifdef H5 || APP-PLUS */
    /* 兼容H5端和App端的导航链接样式 */
    .navigator-wrap {
      flex: 1;
    }
    /* #endif */

    .icons-button {
      flex: 1;
      margin: 0;
      padding: 0;
      font-size: 20rpx;
      color: #333;
      text-align: center;
      line-height: 1.4;
      border-radius: 0;
      background-color: #fff;

      &::after {
        border: none;
      }
    }

    text {
      display: block;
      font-size: 34rpx;
    }
  }
}
